package oo.day07;

public class MultiTypeDemo {

    public static void main(String[] args) {
        Aoo o = new Boo();
        Boo b1 = (Boo)o;
        Inner i1 = (Boo)o;

        if (o instanceof Coo){
            Coo c1 = (Coo)o;//如果执行的话，会发生ClassCastException类型转换异常
        }else {
            System.out.println("o对象不是coo类型");
        }

    }
}
